package com.zrwl.poscloud.xo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zrwl.poscloud.base.entity.FileInfo;
import com.zrwl.poscloud.xo.vo.FileInfoVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface FileInfoService extends SuperService<FileInfo> {



    FileInfo addFile(FileInfoVO fileInfoVO);
    FileInfo findByCode(String FileInfoCode);


    String getFileFullPath(FileInfo FileInfo);

    void deleteFilesFromDisk();


    List<FileInfo> findListBySyncCode(long syncCode);

    //页面查询
    public IPage<FileInfo> getFileInfoList(int currentPage, int pageSize);

    //删除文件写库
    String deleteFileInfo(String uid);

    String recoverFileInfo(String uid);
    /**
     * 下载文件
     * @param request 请求
     * @param response 响应
     * @param code 文件CODE
     * @return
     */
    String getFileByCode(HttpServletRequest request, HttpServletResponse response, String code);
}
